



                      Danny Goodman's 
                JavaScript Bible 4th Edition
                        Appendix A
           Quick Reference and Compatibility Guide
                      1 February 2001


                FOLDABLE POSTER CONFIGURATION
          
             PRINTING AND COLLATING INSTRUCTIONS
             -----------------------------------

           Read this entire document before printing. 
                 
      
      
Requirements
------------
The Quick Reference document requires the Adobe Acrobat Reader 3.0 or later to display and print.  If you do not have this software, it is available for free downloading from http://www.adobe.com.

       -----------------------------------------------
      | IMPORTANT! Adobe Acrobat Page Setup Settings  |
      | --------------------------------------------  |
      | Before you print any part of the Quick        |
      | Reference document, make sure that the        |
      | Page Setup dialog box settings are set to     |
      | LANDSCAPE orientation. If your printer        |
      | provides multiple paper size options (e.g.,   |
      | a regular and 'small' version of U.S.Letter   |
      | or A4), choose the regular paper size. This   |
      | setting minimizes the margins, and lets the   |
      | page content scale up to the largest possible |
      | size to fit your printer's paper.             |
       -----------------------------------------------

The document prints on as many as 12 sides of letter-sized paper. For optimum convenience and portability, the document can be printed on the front and back of printer paper (see below for combinations), and these sheets can be taped together as described below (you will need cellophane tape).

There is a lot of small print in the Quick Reference document (making it difficult to use on the video monitor), so I recommend a 600 dpi printer. Portions of the document may not be readable at lesser resolutions.

In the instructions below, I assume you have a printer that accepts paper from an automatic paper tray as well as from manual feed. Printing on two sides of a page can get confusing, and the process differs with each printer.  Later in these instructions, I provide an explanation of the process for my laser printer as an example.

NOTE: Page layout for this document is not optimized for automatic
duplex printers. Two other versions of this document are optimized for
duplex printing, but assembly is in one of two forms of booklets.

PDF Document Structure
----------------------
As described in the text of the JavaScript Bible 4th Edition, there are essentially three Document Object Models for which we can write scripts:

  * Backward compatible to earliest versions (plus NN4 
    oddities).
  * Microsoft Internet Explorer 4.0 and later (IE4+).
  * The W3C DOM as implemented (in varying degrees) in 
    IE5+ and NN6.
  
Then there is JavaScript, itself:

  * JavaScript core language
  
The Quick Reference document is laid out on 12 sides of paper. You can print out one side per piece of paper, but as described below, it is more compact to print on both sides of a sheet, reducing the entire quick reference to a total of six pieces of paper.

At first glance, the organization of the sides in the PDF document appears completely crazy. But there is method to the madness, especially if you wish to print out the entire set. Bear with me, and continue reading.

Each side has a tiny side number printed in an upper corner. These numbers will help you print and assemble the Quick Reference. The 12 sides contain the following information:

   Side Number      Content
   -----------      ---------------------------------------
        1           IE4+ DOM Quick Reference (Page 1 of 4)
        2           IE4+ DOM Quick Reference (Page 2 of 4)
        3           Orig. DOM Quick Reference (Page 1 of 2)
        4           Orig. DOM Quick Reference (Page 2 of 2)
        5           W3C DOM Quick Reference (Page 1 of 4)
        6           W3C DOM Quick Reference (Page 2 of 4)
        7           W3C DOM Quick Reference (Page 3 of 4)
        8           W3C DOM Quick Reference (Page 4 of 4)
        9           Core JavaScript Quick Reference
       10           Core JS (cont'd); Style Properties
       11           IE4+ DOM Quick Reference (Page 3 of 4)
       12           IE4+ DOM Quick Reference (Page 4 of 4)
       
Sorted by content, the sides match up as follows:

   Content                         Sides
   -----------------------------   ------------------
   Core JavaScript Quick Reference   9, 10
   Style Object Properties          10
   Original DOM Reference            3, 4
   IE4+ DOM Reference                1, 2, 11, 12
   W3C DOM Reference                 5, 6, 7, 8

You do not have to print the entire Quick Reference. Print only those sides that you need for your development needs. The pages for each category are not necessarily contiguous in the PDF document because they are laid out for front/back printing of the entire set. Therefore, pay close attention to Side Numbers, which correspond to the PDF file's printed page numbers. Here are four scenarios to choose from:

   * CROSS-PLATFORM DEVELOPMENT FOR MODERN BROWSERS
     You probably need all 12 sides. You will print Sides 1
     through 6 in one pass (using the automatic feeder in 
     most cases), and then print Sides 7 through 12 on the 
     back. The specific sequence is described below.
   * CROSS-PLATFORM DEVELOPMENT FOR ALL SCRIPTABLE BROWSERS
     You probably need the lowest common denominator of 
     pages: Sides 3, 4, 9, and 10.
   * MSIE-ONLY DEVELOPMENT
     Your set will include the original DOM and Core 
     JavaScript sides, as well as the four IE4+ DOM sides: 
     Sides 1 thru 4 and 9 thru 12.
   * W3C DOM-ONLY DEVELOPMENT
     Your set will include the original DOM and Core 
     JavaScript sides, as well as the four W3C DOM sides: 
     Sides 3 thru 10.

Printed Document Structure
--------------------------
The Quick Reference was designed to display two-page spreads (all pages print in landscape -- wide -- orientation). For example, the four pages of the IE4+ DOM Quick Reference can be printed on two sheets of paper, with Pages 1 and 2 printed on the front, and Pages 3 and 4 on the back. By taping the pages together, one side of the spread would look like this (Sheet numbers shown in the top corners):

         ------------- ------------- 
        |            1|2            | 
        |IE4+ DOM     |     IE4+ DOM|
        |Page 1 of 4  |  Page 2 of 4|
        |             |             |          (Figure 1.)
        |             |             |
         ------------- -------------

The back sides of these two pages should be printed UPSIDE DOWN so that you would view the other side by flipping the pages from top to bottom (or bottom to top). 

         ------------- ------------- 
     >> |             |             | <<
    |   |             |             |   |
    |   |             |             |   |      (Figure 2.)
    |   |             |             |   |
     << |             |             | >>
         ------------- -------------


When you flip the spread shown above, you would see the following:

         ------------- ------------- 
        |           11|12           | 
        |IE4+ DOM     |     IE4+ DOM|
        |Page 3 of 4  |  Page 4 of 4|
        |             |             |          (Figure 3.)
        |             |             |
         ------------- -------------

If you were to print out all sides and assemble them spread-by-spread, this is what the layout of the entire document would be, front and back:

            FRONT                            BACK
 ------------- -------------     ------------- -------------
|            1|2            |   |            7|8            |
|IE4+ DOM     |     IE4+ DOM|   |W3C DOM      |      W3C DOM|
|Page 1 of 4  |  Page 2 of 4|   |Page 3 of 4  |  Page 4 of 4|
|             |             |   |             |             |
|             |             |   |             |             |
 ------------- -------------     ------------- -------------
|            3|4            |   |            9|10           | 
|Original DOM | Original DOM|   |Core JS      | More Core JS|
|Page 1 of 2  |  Page 2 of 2|   |             |  Style Props|
|             |             |   |             |             |
|             |             |   |             |             |
 ------------- -------------     ------------- -------------
|            5|6            |   |           11|12           | 
|W3C DOM      |      W3C DOM|   |IE4+ DOM     |     IE4+ DOM|
|Page 1 of 4  |  Page 2 of 4|   |Page 3 of 4  |  Page 4 of 4|
|             |             |   |             |             |
|             |             |   |             |             |
 ------------- -------------     ------------- -------------
                         (Figure 4.)
                                     
Content of the pages is laid out such that the same document objects for all object models face you at the same time. Thus, you can view the properties of an Image object for IE4+, Original, and W3C DOMs on the front side. On the back side, for example, you can compare the properties and methods of the IE4+ and W3C DOM TABLE objects.

When you look at Figure 4, it doesn't appear as though the IE4 and W3C DOM pages line up properly in the assembled document, but remember that the back sides are printed UPSIDE DOWN (e.g., side 11 is printed upside down on the back of side 1). The trickiest part in getting this right is knowing how to load a sheet manually for the upside down printing of the back side.

A Practice Sheet
----------------
To get to know your printer's paper handling characteristics, experiment with just one page. Print only Page 1 of the PDF Document (in the Print dialog box, enter a Print Range "From 1 To 1"). Let this page print from the automatic feeder of your printer.

To print the back side of the page via the manual feed, imagine that you are feeding a piece of letterhead paper, with the blank side of the Reference page being the side to receive the letter. Place the page into the manual feeder, making sure that the printed side is UPSIDE DOWN with respect to the orientation of the page about to be printed.

Here's how it works on my laser printer: Looking at the printed side in landscape orientation, I flip the page from top to bottom. With the blank side up, I slide the page into the manual feeder, just as if it were a piece of letterhead (letterhead paper is fed face up in my manual feeder). If my feeder had one of those turned-corner page icons on it, the lines representing text would be on the large part of the icon, not on the turned corner (your printer's manual feeder may be the opposite).

The page to be matched with Sheet 1 of the Reference is Sheet 11, so now print that page from Adobe Acrobat, selecting the manual feeder (in the Windows version of Acrobat, you may have to drill down to paper settings via the Properties button in the Print dialog box).

Finally -- and this is the hard part -- once you have discovered the right combination of flipping and feeding, remember what it is so that you can apply it to the rest of the pages.

Printing the Reference
----------------------
You are now ready to perform the final printing.

1. Print the desired front sides (1 through 6) via 
   automatic feed.

2. Print pages 7 through 12 via manual feed, and feed the 
   backs of pages according to the following sequence:
   
       Back Side To Print           Print on Back of Side
       ------------------           ---------------------
                7                             5
                8                             6
                9                             3
               10                             4
               11                             1
               12                             2
   
   If you are unsure about orientation of the back sides, 
   you can print the back sides one page at a time and 
   verify that everything comes out the way you want it.

Assembling the Reference
------------------------
Assemble the horizontal, two-page spreads first. For example, if you printed the IE4+ DOM pages, begin by placing sheets 1 and 2 side-by-side to create a two-page spread, as indicated above in Figure 1.

Carefully align the pages and apply cellophane tape to join the pages together. Avoid overlapping the pages. You can use multiple pieces of tape (e.g., use small pieces at the top and bottom to stabilize the pages, then fill in the center with a longer piece).

Repeat this for each of the two-page spreads.

Next, join the spreads together from top to bottom, using the left side of Figure 4 as a guide. You are, of course, free to assemble the spreads in a different top-to-bottom sequence as you see fit, but always keep sheets numbered 1 through 6 on the same side of your assembled tabloid.

Folding the Reference
---------------------
There is no single perfect way to fold the Quick Reference, but you will probably want to fold the horizontal seams first. You can fold these into a "Z" formation, or fold the top and bottom into the center. 

Here is how I do it:

With sheets 1 through 6 facing me:

1. Fold the bottom spread up.
2. Fold the top spread down.
3. Fold along the remaining vertical seam

This leaves the Core JavaScript and style object property listings on the outside (after vertically flipping the booklet), so that I don't have a lot of wrestling to do to get to these commonly accessed pages.

Other folding schemes of your own design can provide you with other pages available for handy reference without having to unfold the whole document. My guess is that after some usage, it will become folded in as many ways as the maps in your automobile glove compartment.

Maintaining the Reference
-------------------------
After a lot of folding and unfolding, some of the cellophane tape seams will begin to break. Repair them before the whole thing starts to fall apart.

You always have the "comfort" of being able to print and assemble a new set. But by that time, you will have forgotten how your printer wants to print the back sides, and you'll go through the practice session once more.

Other Display Ideas
-------------------
If you print the Quick Reference on one side of 12 sheets of paper, you have enough square footage to create a good-sized mural. You'll have to take down your Star Trek AND Britney Spears posters to make room. Unfortunately, you'll also need a pair of binoculars to read the fine print from your computer chair. But your colleagues will certainly be impressed!


Updated versions of this document are available at: www.dannyg.com/javascript
Comments and suggestions welcome: roadmap@dannyg.com


Copyright 2001 Danny Goodman (www.dannyg.com). All Rights Reserved.
